﻿using Apps.Common;
using Apps.DAL.SelfRcRelated;
using Apps.IBLL.SelfRcRelated;
using Apps.Models;
using Apps.Models.CustomModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Apps.BLL.SelfRcRelated
{
    public partial class SelfRcRelatedBLL : ISelfRcRelatedBLL
    {
        SelfRcRelated_Repository dal = new SelfRcRelated_Repository();

        /// <summary>
        /// 获取自采煤相关信息
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public TestDataOutPutModel GetSelfSampingInfo(TestDataQuertParaModel model)
        {
            return dal.GetSelfSampingInfo(model);
        }

        /// <summary>
        ///入厂关联自采
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool RelaterdData(TestDataOutPutModel model)
        { 
           return dal.RelaterdData(model);
        }

        /// <summary>
        ///取消入厂关联自采
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool UnRelaterdData(TestDataOutPutModel model)
        {
            return dal.UnRelaterdData(model);
        }


        /// <summary>
        ///设置为结算状态
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool JieSuanData(TestDataOutPutModel model)
        {
            return dal.JieSuanData(model);
        }

        /// <summary>
        ///取消结算状态
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool UnJieSuanData(TestDataOutPutModel model)
        {
           return dal.UnJieSuanData(model);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public SELF_SAMPLING_RC_RELATED Info(string batchCode, string type = "")
        {
            return dal.Info(batchCode, type);
        }

        /// <summary>
        /// 判断是否已经存在
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public bool Any(string selfBacthCode, string rcBatchCode)
        {
            return false;
        }

        public V_LMS_RESULT TestDataInfo(string testCode)
        {
            return dal.TestDataInfo(testCode);
        }

        /// <summary>
        /// 获取入厂批次列表
        /// </summary>
        /// <param name="model"></param>
        /// <param name="totalCount"></param>
        /// <returns></returns>
        public List<RcBatchModel> GetRcBatchList(TestDataQuertParaModel model, ref int totalCount)
        { 
            return dal.GetRcBatchList(model, ref totalCount);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool Add(SELF_SAMPLING_RC_RELATED model)
        {
            return true;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool Update(SELF_SAMPLING_RC_RELATED model)
        {
            return false;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public bool Delete(string id)
        {
            return false;
        }

        #region 查询焦炭反应性数据

        //: DbContext<YANX_RECORD>
        public List<TestDataCokeOutPutModel> GetCokeList(TestDataCokeParaModel model, ref int totalCount, bool isPage = true)
        {
            return dal.GetCokeList(model, ref totalCount, isPage);

        }

        #endregion
    }
}
